* Apply to: roadmaps_1.dta
* Description:  Figures A3 and A4 in the OA

clear

set more off


* Figure A3
* All respondents

clear

import excel "...\1805 Roadmaps\Table A9 any info simqi.xlsx", sheet("Sheet1") firstrow

drop if model==.

* Create black values to facilitate bar spacing

set obs 9
replace model = 1 in 9
replace treatment = "blank1" in 9
replace estimate = 0 in 9
replace change = 0 in 9

set obs 10
replace model = 1 in 10
replace treatment = "blank2" in 10
replace estimate = 0 in 10
replace change = 0 in 10

set obs 11
replace model = 1 in 11
replace treatment = "blank3" in 11
replace estimate = 0 in 11
replace change = 0 in 11


* Create order term

gen order1 = 0
replace order1 = 1 if treatment=="control" & model==1
replace order1 = 2 if treatment=="any" & model==1
replace order1 = 3 if treatment=="blank1"
replace order1 = 4 if treatment=="control" & model==2
replace order1 = 5 if treatment=="any" & model==2
replace order1 = 6 if treatment=="blank2"
replace order1 = 7 if treatment=="control" & model==3
replace order1 = 8 if treatment=="any" & model==3
replace order1 = 9 if treatment=="blank3"
replace order1 = 10 if treatment=="control" & model==4
replace order1 = 11 if treatment=="any" & model==4

sort order1


* Replace negative values with zero

replace change = 0 if change < 0


* Figure A3a (First Difference Spatial Advantage)

graph bar change if model!=., ///
     over(order1, label(nolabels)) ///
     asyvars bargap(0) ylabel(0(.10).93) legend(off) ///
	 ytitle("") ///
	 yline(0, lcolor(black)) ///
	 bar(1, lcolor(black) bcolor(gs16)) ///
	 bar(2, lcolor(black) bcolor(gs0)) ///
	 bar(4, lcolor(black) bcolor(gs16)) ///
	 bar(5, lcolor(black) bcolor(gs0)) ///
	 bar(7, lcolor(black) bcolor(gs16)) ///
	 bar(8, lcolor(black) bcolor(gs0)) ///
	 bar(10, lcolor(black) bcolor(gs16)) ///
	 bar(11, lcolor(black) bcolor(gs0)) ///
	 text(.06 4 "{bf:(-.18)}", size(large)) ///
	 text(.39 16 "{bf:.27 *}{superscript:a}", size(large)) ///
	 text(.27 33 "{bf:.15}", size(large)) ///
	 text(.42 42 "{bf:.30}{superscript:a}", size(large)) ///
	 text(.51 59 "{bf:.39}{superscript:a}", size(large)) ///
	 text(.44 68 "{bf:.32}{superscript:a}", size(large)) ///
	 text(.65 85 "{bf:.53}", size(large)) ///
	 text(.44 94 "{bf:.32}{superscript:a}", size(large)) ///
	 text(-.06 11 "{bf:Knowledge = 1}", size(medsmall)) ///
	 text(-.06 37 "{bf:Knowledge = 2}", size(medsmall)) ///
	 text(-.06 63 "{bf:Knowledge = 3}", size(medsmall)) ///
	 text(-.06 90 "{bf:Knowledge = 4}", size(medsmall)) ///
	 intensity(*0.9) scheme(s1color) ///
	 note(" " " " " ") ///
     graphregion(color(white)) plotregion(color(white))


* Figure A3b (Predicted Probability Support Moderate)

graph bar estimate if model!=., ///
     over(order1, label(nolabels)) ///
     asyvars bargap(0) ylabel(0(.10).93) legend(off) ///
	 ytitle("") ///
	 bar(1, lcolor(black) bcolor(gs16)) ///
	 bar(2, lcolor(black) bcolor(gs0)) ///
	 bar(4, lcolor(black) bcolor(gs16)) ///
	 bar(5, lcolor(black) bcolor(gs0)) ///
	 bar(7, lcolor(black) bcolor(gs16)) ///
	 bar(8, lcolor(black) bcolor(gs0)) ///
	 bar(10, lcolor(black) bcolor(gs16)) ///
	 bar(11, lcolor(black) bcolor(gs0)) ///
	 text(.76 7 "{bf:.64}", size(large)) ///
	 text(.48 16 "{bf:.36}", size(large)) ///
	 text(.52 33 "{bf:.40}", size(large)) ///
	 text(.41 42 "{bf:.29}", size(large)) ///
	 text(.32 59 "{bf:.20}", size(large)) ///
	 text(.35 68 "{bf:.23}", size(large)) ///
	 text(.21 85 "{bf:.09}", size(large)) ///
	 text(.30 94 "{bf:.18}", size(large)) ///
	 text(-.06 11 "{bf:Knowledge = 1}", size(medsmall)) ///
	 text(-.06 37 "{bf:Knowledge = 2}", size(medsmall)) ///
	 text(-.06 63 "{bf:Knowledge = 3}", size(medsmall)) ///
	 text(-.06 90 "{bf:Knowledge = 4}", size(medsmall)) ///
	 intensity(*0.9) scheme(s1color) ///
	 note(" " " " " ") ///
     graphregion(color(white)) plotregion(color(white))


* Figure A4
* All respondents

clear

import excel "...\1805 Roadmaps\Table A9 simqi.xlsx", sheet("Sheet1") firstrow

drop if model==.

* Create black values to facilitate bar spacing

set obs 21
replace model = 1 in 21
replace treatment = "blank1" in 21
replace estimate = 0 in 21
replace change = 0 in 21

set obs 22
replace model = 1 in 22
replace treatment = "blank2" in 22
replace estimate = 0 in 22
replace change = 0 in 22

set obs 23
replace model = 1 in 23
replace treatment = "blank3" in 23
replace estimate = 0 in 23
replace change = 0 in 23


* Create order term

gen order1 = 0
replace order1 = 1 if treatment=="control" & model==1
replace order1 = 2 if treatment=="guide" & model==1
replace order1 = 3 if treatment=="party" & model==1
replace order1 = 4 if treatment=="perspat" & model==1
replace order1 = 5 if treatment=="perpty" & model==1
replace order1 = 6 if treatment=="blank1"
replace order1 = 7 if treatment=="control" & model==2
replace order1 = 8 if treatment=="guide" & model==2
replace order1 = 9 if treatment=="party" & model==2
replace order1 = 10 if treatment=="perspat" & model==2
replace order1 = 11 if treatment=="perpty" & model==2
replace order1 = 12 if treatment=="blank2"
replace order1 = 13 if treatment=="control" & model==3
replace order1 = 14 if treatment=="guide" & model==3
replace order1 = 15 if treatment=="party" & model==3
replace order1 = 16 if treatment=="perspat" & model==3
replace order1 = 17 if treatment=="perpty" & model==3
replace order1 = 18 if treatment=="blank3"
replace order1 = 19 if treatment=="control" & model==4
replace order1 = 20 if treatment=="guide" & model==4
replace order1 = 21 if treatment=="party" & model==4
replace order1 = 22 if treatment=="perspat" & model==4
replace order1 = 23 if treatment=="perpty" & model==4

sort order1


* Replace negative values with zero

replace change = 0 if change < 0


* Figure A4a (First Difference Spatial Advantage)

graph bar change if model!=., ///
     over(order1, label(nolabels)) ///
     asyvars bargap(0) ylabel(0(.10).93) legend(off) ///
	 ytitle("") ///
	 yline(0, lcolor(black)) ///
	 bar(1, lcolor(black) bcolor(gs16)) ///
	 bar(2, lcolor(black) bcolor(gs0)) ///
	 bar(4, lcolor(black) bcolor(gs16)) ///
	 bar(5, lcolor(black) bcolor(gs6)) ///
	 bar(6, lcolor(black) bcolor(gs12)) ///
	 bar(7, lcolor(black) bcolor(gs0)) ///
	 bar(8, lcolor(black) bcolor(gs4)) ///
	 bar(1, lcolor(black) bcolor(gs16)) ///
	 bar(2, lcolor(black) bcolor(gs6)) ///
	 bar(3, lcolor(black) bcolor(gs13)) ///
	 bar(4, lcolor(black) bcolor(gs0)) ///
	 bar(5, lcolor(black) bcolor(gs4)) ///
	 bar(7, lcolor(black) bcolor(gs16)) ///
	 bar(8, lcolor(black) bcolor(gs6)) ///
	 bar(9, lcolor(black) bcolor(gs13)) ///
	 bar(10, lcolor(black) bcolor(gs0)) ///
	 bar(11, lcolor(black) bcolor(gs4)) ///
	 bar(13, lcolor(black) bcolor(gs16)) ///
	 bar(14, lcolor(black) bcolor(gs6)) ///
	 bar(15, lcolor(black) bcolor(gs13)) ///
	 bar(16, lcolor(black) bcolor(gs0)) ///
	 bar(17, lcolor(black) bcolor(gs4)) ///
	 bar(19, lcolor(black) bcolor(gs16)) ///
	 bar(20, lcolor(black) bcolor(gs6)) ///
	 bar(21, lcolor(black) bcolor(gs13)) ///
	 bar(22, lcolor(black) bcolor(gs0)) ///
	 bar(23, lcolor(black) bcolor(gs4)) ///
	 text(.06 2 "{bf:(-.02)}", size(small)) ///
	 text(.26 8 "{bf:.14}{superscript:a}", size(small)) ///
	 text(.33 12 "{bf:.21*}{superscript:a}", size(small)) ///
	 text(.26 16 "{bf:.14}", size(small)) ///
	 text(.30 20 "{bf:.18*}{superscript:a}", size(small)) ///
	 text(.41 28 "{bf:.29}{superscript:a}", size(small)) ///
	 text(.29 33 "{bf:.17}", size(small)) ///
	 text(.52 37 "{bf:.40}{superscript:a}", size(small)) ///
	 text(.37 42 "{bf:.25}{superscript:a}", size(small)) ///
	 text(.19 46 "{bf:.07}", size(small)) ///
	 text(.60 54 "{bf:.48}{superscript:a}", size(small)) ///
	 text(.29 58 "{bf:.17}", size(small)) ///
	 text(.63 63 "{bf:.51}{superscript:a}", size(small)) ///
	 text(.44 67 "{bf:.32}", size(small)) ///
	 text(.06 73 "{bf:(-.02*)}", size(small)) ///
	 text(.69 80 "{bf:.57}{superscript:a}", size(small)) ///
	 text(.25 84 "{bf:.13}", size(small)) ///
	 text(.70 88 "{bf:.58}", size(small)) ///
	 text(.48 93 "{bf:.36}", size(small)) ///
	 text(.06 99 "{bf:(-.10*)}", size(small)) ///
	 text(-.06 12 "{bf:Knowledge = 1}", size(medsmall)) ///
	 text(-.06 37 "{bf:Knowledge = 2}", size(medsmall)) ///
	 text(-.06 63 "{bf:Knowledge = 3}", size(medsmall)) ///
	 text(-.06 89 "{bf:Knowledge = 4}", size(medsmall)) ///
	 intensity(*0.9) scheme(s1color) ///
	 note(" " " " " ") ///
     graphregion(color(white)) plotregion(color(white))


* Figure A4b (Predicted Probability Support Moderate)

graph bar estimate if model!=., ///
     over(order1, label(nolabels)) ///
     asyvars bargap(0) ylabel(0(.10).93) legend(off) ///
	 ytitle("") ///
	 bar(1, lcolor(black) bcolor(gs16)) ///
	 bar(2, lcolor(black) bcolor(gs6)) ///
	 bar(3, lcolor(black) bcolor(gs13)) ///
	 bar(4, lcolor(black) bcolor(gs0)) ///
	 bar(5, lcolor(black) bcolor(gs4)) ///
	 bar(7, lcolor(black) bcolor(gs16)) ///
	 bar(8, lcolor(black) bcolor(gs6)) ///
	 bar(9, lcolor(black) bcolor(gs13)) ///
	 bar(10, lcolor(black) bcolor(gs0)) ///
	 bar(11, lcolor(black) bcolor(gs4)) ///
	 bar(13, lcolor(black) bcolor(gs16)) ///
	 bar(14, lcolor(black) bcolor(gs6)) ///
	 bar(15, lcolor(black) bcolor(gs13)) ///
	 bar(16, lcolor(black) bcolor(gs0)) ///
	 bar(17, lcolor(black) bcolor(gs4)) ///
	 bar(19, lcolor(black) bcolor(gs16)) ///
	 bar(20, lcolor(black) bcolor(gs6)) ///
	 bar(21, lcolor(black) bcolor(gs13)) ///
	 bar(22, lcolor(black) bcolor(gs0)) ///
	 bar(23, lcolor(black) bcolor(gs4)) ///
	 text(.77 4 "{bf:.65}", size(small)) ///
	 text(.68 8 "{bf:.56}", size(small)) ///
	 text(.39 11 "{bf:.27*}", size(small)) ///
	 text(.57 16 "{bf:.45}", size(small)) ///
	 text(.34 21 "{bf:.22*#}", size(small)) ///
	 text(.52 28 "{bf:.40}", size(small)) ///
	 text(.54 33 "{bf:.42}", size(small)) ///
	 text(.30 37 "{bf:.18*#}", size(small)) ///
	 text(.48 42 "{bf:.36}", size(small)) ///
	 text(.33 47 "{bf:.21*#}", size(small)) ///
	 text(.31 54 "{bf:.19}", size(small)) ///
	 text(.41 58 "{bf:.29}", size(small)) ///
	 text(.24 63 "{bf:.12}", size(small)) ///
	 text(.40 67 "{bf:.28}", size(small)) ///
	 text(.33 72 "{bf:.21}", size(small)) ///
	 text(.21 80 "{bf:.09}", size(small)) ///
	 text(.32 84 "{bf:.20}", size(small)) ///
	 text(.21 88 "{bf:.09}", size(small)) ///
	 text(.34 93 "{bf:.22}", size(small)) ///
	 text(.34 98 "{bf:.22}", size(small)) ///
	 text(-.06 12 "{bf:Knowledge = 1}", size(medsmall)) ///
	 text(-.06 37 "{bf:Knowledge = 2}", size(medsmall)) ///
	 text(-.06 63 "{bf:Knowledge = 3}", size(medsmall)) ///
	 text(-.06 89 "{bf:Knowledge = 4}", size(medsmall)) ///
	 intensity(*0.9) scheme(s1color) ///
	 note(" " " " " ") ///
     graphregion(color(white)) plotregion(color(white))

* End
